{include file="public/header" select="0" /}

<body>
<div class="title bgc">
    <i class="layui-icon layui-icon-left" onclick="load_href('{:url(\'user/index\')}',2)"></i>
    提现
</div>
<form action="{:url('draw/save')}" method="post" class="form layui-form">
    <ul class="set-form bgc">
        <li>
            <span>提现账户</span>
            <div class="layui-form">
                <select name="account">
                    <option value="bonus">奖金</option>
                </select>
            </div>
        </li>
        <li>
            <span>账户余额 </span>
            <p style="padding-right: .6rem">{$user.assets.bonus}</p>
        </li>

        <li>
            <span>提现方式</span>
            <div>
                <select name="mode" lay-filter="mode">
                    <option value="微信">微信</option>
                    <option value="支付宝">支付宝</option>
                    <option value="银行卡">银行卡</option>
                </select>
            </div>
        </li>
        {if $user.wechat_image}
        <li class="wechat">
            <span>真实姓名</span>
            <label><input type="text" value="{$user.wechat_name}" placeholder="请填写真实姓名"></label>
        </li>
        <li class="wechat right_parent">
            <span>微信收款码</span>
            <div class="right_div">
                <img class="right_img" src="{$user.wechat_image}" alt="">
            </div>
        </li>
        {else}
        <li class="wechat">
            <span>微信收款码</span>
            <a href="{:url('user/method',['type'=>'wechat','go_back'=>1])}" style="color: #8D8D8D">暂未绑定，点击去绑定</a>
        </li>
        {/if}

        {if $user.alipay_image}
        <li class="alipay" style="display: none">
            <span>真实姓名</span>
            <label><input type="text" value="{$user.alipay_name}" placeholder="请填写真实姓名"></label>
        </li>
        <li class="alipay right_parent" style="display: none">
            <span>支付宝收款码</span>
            <div class="right_div">
                <img class="right_img" src="{$user.alipay_image}" alt="">
            </div>
        </li>
        {else}
        <li class="alipay" style="display: none">
            <span>支付宝收款码</span>
            <a href="{:url('user/method',['type'=>'alipay','go_back'=>1])}" style="color: #8D8D8D">暂未绑定，点击去绑定</a>
        </li>
        {/if}

        {if $user.bank_number}
        <li class="bank" style="display: none">
            <span>银行名称</span>
            <label><input type="text" value="{$user.bank_name}" placeholder="请填写开户行"></label>
        </li>
        <li class="bank" style="display: none">
            <span>开户行</span>
            <label><input type="text" value="{$user.bank_open}" placeholder="请填写开户行"></label>
        </li>
        <li class="bank" style="display: none">
            <span>银行户名</span>
            <label><input type="text" value="{$user.bank_account_name}" placeholder="请填写银行户名"></label>
        </li>
        <li class="bank" style="display: none">
            <span>银行账号</span>
            <label><input type="text" value="{$user.bank_number}" placeholder="请填写银行账号"></label>
        </li>
        {else}
        <li class="bank" style="display: none">
            <span>银行信息</span>
            <a href="{:url('user/method',['type'=>'bank','go_back'=>1])}" style="color: #8D8D8D">暂未绑定，点击去绑定</a>
        </li>
        {/if}
    </ul>
    <ul class="set-form bgc">
        <li>
            <span>提现金额</span>
            <label>
                <input type="text" lay-verify="required" lay-reqtext="请输入提现金额" lay-verType="tips"
                          name="money" placeholder="请输入提现金额" autocomplete="off"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
            </label>
        </li>
        <li>
            <span>支付密码</span>
            <label><input type="password" lay-verify="required" lay-reqtext="请输入支付密码" lay-verType="tips"
                          name="pay_password" placeholder="请输入支付密码"></label>
        </li>
    </ul>
    {if !$user.wechat_image && !$user.alipay_image && !$user.bank_number}
    <div class="pay-btn" style="background-color: #8D8D8D"><a>无法提现</a></div>
    {else}
    <div class="pay-btn" lay-submit lay-filter="save" formObj=".form"><a>确定</a></div>
    {/if}

</form>
<div class="pay-btn tran-btn"><a href="{:url('draw/record')}">提现记录</a></div>
</body>
{include file="public/footer" select="0" /}